-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix XS missing 'ctx' into context #73
Conversation
I'm trying to get myself a bit more familiar with subscriptions and web sockets here, but I have a couple thoughts so far: : {
service: connection.$service,
};
},
subscriptions: {
onConnect: connectionParams => ({
...connectionParams,
$service: this,
}),
}, In inspecting what happens here, the
As I mentioned in my opening, I'm not terribly familiar with GraphQL subscriptions or web sockets in general as I've not used either, but I wanted to get my initial thoughts on the table. I'll dig in some more. |
So, after digging in a bit here, that's where With that in mind, I am more of the opinion that establishing context in |
Yes, using the ContextFactory.create is the right way to create context. Moreover, if you don't define |
Yep you are totally right with these points.
I think it can do the job quite well. I have change the code, let me know what you think. |
@shawnmcknight could you help to check it? |
What's the status of this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the delay in this review. After the latest batch of changes, shouldn't the constuction of the Apollo Context for the WS connection no longer be looking at the .socket
property for $params
and $ctx
, similar to how its not using it for $service
?
Absolutely right, now fixed |
Sorry I forgot to commit test file, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Merging 🤖
Awesome, thanks @shawnmcknight & @Hugome! |
Fix #72